package com.project.poetry.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.poetry.service.entity.dto.flyingflower.FlyingFlowerDetailDTO;
import com.project.poetry.service.entity.dto.flyingflower.FlyingFlowerRankingDTO;
import com.project.poetry.service.entity.po.flyingflower.FlyingFlowerPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 飞花令持久层，对应 t_flying_flower
 * @author mengxj
 */
public interface FlyingFlowerMapper extends BaseMapper<FlyingFlowerPO> {

    /**
     * 根据飞花令id查询答题过程详情
     * @param flyingId 飞花令id
     * @return 答题过程详情
     */
    List<FlyingFlowerDetailDTO> flyingFlowerDetail(@Param("flyingId") Long flyingId);

    /**
     * 答题排行榜 前 num 名
     * @param num 查询条数
     * @return 排行榜数据
     */
    List<FlyingFlowerRankingDTO> ranking(@Param("num") Integer num);
}
